﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="KeyUnitAdd.aspx.cs" Inherits="KeyUnitAdd" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        #fPic
        {
            width: 317px;
            height: 23px;
        }
        .style8
        {
            width: 80px;
        }
        .style11
        {
            width: 136px;
        }
        .style12
        {
            width: 57px;
        }
        .style13
        {
            width: 80px;
            height: 6px;
        }
        .style14
        {
            height: 6px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server" enctype="multipart/form-data">
    <cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </cc1:ToolkitScriptManager>
    <div>
        <cc1:TabContainer ID="TabContainer1" runat="server" AutoPostBack="true" ActiveTabIndex="1">
            <cc1:TabPanel runat="server" HeaderText="添加单位" ID="TabPanel1" >
                <HeaderTemplate>
                    添加单位
                </HeaderTemplate>
                <ContentTemplate>
                    <table style="width: 821px">
                        <tr>
                            <td colspan="2">
                                &nbsp;<asp:Label ID="lblCount" runat="server" Text="单位总数"></asp:Label>
                            </td>
                            <td>
                                &nbsp;<asp:TextBox ID="txtCount" runat="server" Width="257px"></asp:TextBox>
                                <asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="txtCount"
                                    ErrorMessage="整数且必须大于0" MaximumValue="1000" MinimumValue="1" Type="Integer"></asp:RangeValidator>
                            </td>
                            <td >
                            <a href="四个能力—重点单位录入说明.doc" target="_blank">录入说明</a>
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:Label ID="lblDWGM_Police" runat="server" Text="所属派出所"></asp:Label>
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlPoliceStations" runat="server" Height="25px" 
                                    Width="260px">
                                </asp:DropDownList>
                            </td>
                            <td >
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                单位名称
                            </td>
                            <td>
                                <asp:TextBox ID="txtUnitName" runat="server" Width="642px" Height="22px"></asp:TextBox>
                            </td>
                            <td >
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                完成情况
                            </td>
                            <td>
                                <asp:RadioButtonList ID="RadioButtonList1" runat="server" Height="16px" onclick="rblChange()"
                                    RepeatDirection="Horizontal">
                                    <asp:ListItem Selected="True" Value="已完成">已完成</asp:ListItem>
                                    <asp:ListItem Value="未完成">未完成</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                            <td >
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                单位类型
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlUnitType" runat="server" Height="22px" Style="margin-bottom: 1px"
                                    Width="143px">
                                </asp:DropDownList>
                            </td>
                            <td >
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                重点单<br />
                                位信息
                            </td>
                            <td>
                                <asp:TextBox ID="txtUnitInfo" runat="server" Height="129px" TextMode="MultiLine"
                                    Width="643px"></asp:TextBox>
                            </td>
                            <td >
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                完成情<br />
                                况简介
                            </td>
                            <td>
                                <asp:TextBox ID="txtPerformanceInfo" runat="server" Height="129px" TextMode="MultiLine"
                                    Width="642px"></asp:TextBox>
                            </td>
                            <td >
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp;
                            </td>
                            <td class="style6" >
                            </td>
                            <td align="right">
                                &nbsp;
                            </td>
                            <td >
                                &nbsp;
                                <asp:Button ID="btnSave" runat="server" OnClick="btnSave_Click" Text="保存" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                &nbsp;
                            </td>
                            <td class="style6">
                                &nbsp;
                            </td>
                            <td>
                                &nbsp;</td>
                            <td >
                                &nbsp;
                                </td>
                        </tr>
                        <tr>
                            <td >
                                &nbsp;
                            </td>
                            <td colspan="2">
                                重点单位类型对照表</td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp;</td>
                            <td colspan="2">
                                <asp:DataList ID="DataList1" runat="server">
                                    <ItemTemplate>
                                        <table class="style4">
                                            <tr>
                                                <td class="style5">
                                                    <%# Eval("KeyUnitTypeDescript")%>
                                                </td>
                                                <td class="style3">
                                                </td>
                                                <td>
                                                    <%# Eval("KeyUnitTypeName")%></td>
                                            </tr>
                                        </table>
                                    </ItemTemplate>
                                </asp:DataList>
                            </td>
                            <td>
                                &nbsp;</td>
                        </tr>
                    </table>
                </ContentTemplate>
            </cc1:TabPanel>
            <cc1:TabPanel ID="TabPanel2" runat="server" HeaderText="上传图片">
                 <ContentTemplate>
                    &nbsp;&nbsp;<table style="width: 699px">
                        <tr>
                            <td class="style8" >
                            </td>
                            <td colspan="6" style="color: #FF0000">
                                注意：每个类型的图片不得少于4张</td>
                            <td colspan="3">
                            </td>
                            <td style="width: 32px" colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td class="style8" rowspan="5" >
                                类型：</td>
                            <td colspan="3" rowspan="5">
                                <asp:RadioButtonList ID="rblImgType" runat="server" Width="219px">
                                    <asp:ListItem Selected="True">单位概貌</asp:ListItem>
                                    <asp:ListItem>检查和整改火灾隐患</asp:ListItem>
                                    <asp:ListItem>扑救初期火灾</asp:ListItem>
                                    <asp:ListItem>组织引导人员疏散逃生</asp:ListItem>
                                    <asp:ListItem>消防安全知识宣传教育培训</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                            <td colspan="3">
                                <asp:Label ID="lblGM" runat="server"></asp:Label>
                            </td>
                            <td colspan="3" rowspan="5">
                                &nbsp;</td>
                            <td style="width: 32px" colspan="3" rowspan="5">
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <asp:Label ID="lblJC" runat="server"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <asp:Label ID="lblPJ" runat="server"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <asp:Label ID="lblZZ" runat="server"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <asp:Label ID="lblXF" runat="server"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="style8" >
                                图片：
                            </td>
                            <td colspan="12">
                                <input id="fPic" name="File1"  type="file" /></td>
                        </tr>
                        <tr>
                            <td class="style8" >
                                图片描述：
                            </td>
                            <td colspan="12">
                                <asp:TextBox CssClass="txtwidth" ID="txtDescript" runat="server" TextMode="MultiLine"
                                    Width="314px" Height="76px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="style8" >
                                &nbsp;</td>
                            <td class="style12">
                                &nbsp;</td>
                            <td class="style11">
                                &nbsp;</td>
                            <td colspan="2">
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                            <td>
                                <asp:Button ID="btnUpLoad" runat="server" OnClick="btnUpLoad_Click" Text="保存" 
                                    CausesValidation="False" Height="26px" Width="47px" />
                            </td>
                            <td>
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                            <td colspan="2">
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                            <td>
                                &nbsp;</td>
                        </tr>
                        <tr>
                            <td class="style13" >
                                &nbsp;&nbsp;
                            </td>
                            <td colspan="12" class="style14">
                            </td>
                        </tr>
                    </table>
                    <asp:DataList ID="DltList" RepeatColumns="4" runat="server" RepeatDirection="Horizontal">
                        <ItemTemplate>
                            <table>
                                <tr>
                                    <td>
                                        <div style="border: solid 1px #CCCCCC; padding: 3px; width: 160px; height: 120px;">
                                            <a target="_blank" href='<%# Eval("PictureUrl") %>'>
                                                <img src='<%# Eval("PictureUrl") %>' width="160px" height="120px" /></a>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="center">
                                        <%# Eval("PictureType")%>
                                    </td>
                                    </tr>
                                    <tr>
                                        <td align="center">
                                            <%# Eval("PictureDescript")%>
                                        </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:Button ID="btnImgDel" runat="server" Text="删除" ImageUrl="~/Images/Delete.gif" 
                                            CommandArgument='<%# Eval("PerformancePicID") %>' OnClientClick="return confirm('确定要删除此图片吗？')"
                                            ToolTip="删除" oncommand="btnImgDel_Command"  />
                                    </td>
                                </tr>
                            </table>
                        </ItemTemplate>
                    </asp:DataList>
                </ContentTemplate>
            </cc1:TabPanel>
        </cc1:TabContainer>
        
       
        
    </div>
    </form>
</body>
</html>
